<?php

header("Content-Encoding: none\r\n");
header("Transfer-Encoding:chunked\r\n");

$bufferLen = 1024*32;
ob_implicit_flush(1);
ob_start();//打开缓冲区
echo str_repeat(" ",$bufferLen);
for ($i=10; $i>0; $i--)
{

    $str = $i." ".date("Y-m-d H:i:s").'333<br />';
    $len = strlen($str);
    echo $str;

    if($i > 5){
        echo str_repeat(" ",$bufferLen);
    }
    ob_flush();
    flush();
    sleep(1);

}
ob_end_flush();//输出并关闭缓冲